package com.hoshiibuy.spu.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * SPU基本资料
 *
 * @author : yangcheng
 * @date : 2019/4/30 10:36
 * @mail : maiboyc@163.com
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class BaseSpu extends BaseEntity {

    // 公司ID
    @NotNull(message = "公司ID不能为空")
    @ApiModelProperty(name = "companyid", value = "公司ID", required = true, dataType = "java.lang.Long", example = "3171776001692664000")
    private Long companyid;

    // 平台ID
    @NotNull(message = "平台ID不能为空")
    @ApiModelProperty(name = "platformid", value = "平台ID", dataType = "java.lang.Long", example = "3171776001692664001")
    private Long platformid;

    // 门店ID
    @NotNull(message = "门店ID不能为空")
    @ApiModelProperty(name = "storeid", value = "门店ID", dataType = "java.lang.Long", example = "3171776001692664002")
    private Long storeid;

    // spu编号
    @NotNull(message = "spu编号不能为空")
    @ApiModelProperty(name = "spuno", value = "spu编号", required = true, dataType = "java.lang.String", example = "SPU0001")
    private String spuno;

    // 商品标题
    @NotNull(message = "商品标题不能为空")
    @ApiModelProperty(name = "title", value = "商品标题", required = true, dataType = "java.lang.String", example = "衬衫")
    private String title;

    // 商品副标题
    @NotNull(message = "商品副标题不能为空")
    @ApiModelProperty(name = "subTitle", value = "商品副标题", dataType = "java.lang.String", example = "女士V领衬衫")
    private String subTitle;

    // 商品类目 --来源于商品类目表
    @NotNull(message = "商品类目不能为空")
    @ApiModelProperty(name = "categoryid", value = "商品类目", required = true, dataType = "java.lang.Long", example = "3171776001692664003")
    private Long categoryid;

    // 品牌ID
    @NotNull(message = "品牌ID不能为空")
    @ApiModelProperty(name = "brandid", value = "品牌ID", required = true, dataType = "java.lang.Long", example = "3171776001692664004")
    private Long brandid;

    // 销售单位
    @NotNull(message = "销售单位不能为空")
    @ApiModelProperty(name = "saleUnit", value = "销售单位", required = true, dataType = "java.lang.String", example = "XXX销售单位")
    private String saleUnit;

    // 包装单位
    @NotNull(message = "包装单位不能为空")
    @ApiModelProperty(name = "packetUnit", value = "包装单位", required = true, dataType = "java.lang.String", example = "XXX包装单位")
    private String packetUnit;

    // 商品重量
    @NotNull(message = "商品重量不能为空")
    @ApiModelProperty(name = "weighht", value = "商品重量", required = true, dataType = "java.lang.Double", example = "10.5")
    private Double weighht;

    // 税率
    @NotNull(message = "税率不能为空")
    @ApiModelProperty(name = "taxRate", value = "税率", required = true, dataType = "java.lang.Double", example = "0.1")
    private Double taxRate;

    // 长度
    @NotNull(message = "长度不能为空")
    @ApiModelProperty(name = "goodsLen", value = "长度", required = true, dataType = "java.lang.Double", example = "50.5")
    private Double goodsLen;

    // 宽度
    @NotNull(message = "宽度不能为空")
    @ApiModelProperty(name = "goodsWidth", value = "宽度", required = true, dataType = "java.lang.Double", example = "13.0")
    private Double goodsWidth;

    // 高度
    @NotNull(message = "高度不能为空")
    @ApiModelProperty(name = "goodsHeight", value = "高度", required = true, dataType = "java.lang.Double", example = "5.8")
    private Double goodsHeight;

    // 内件数
    @NotNull(message = "内件数不能为空")
    @ApiModelProperty(name = "innerBoxs", value = "内件数", required = true, dataType = "java.lang.Double", example = "10.0")
    private Double innerBoxs;

    // 外箱数
    @NotNull(message = "外箱数不能为空")
    @ApiModelProperty(name = "outerBoxs", value = "外箱数", required = true, dataType = "java.lang.Double", example = "1.0")
    private Double outerBoxs;

    // 采购地
    @NotNull(message = "采购地不能为空")
    @ApiModelProperty(name = "poAddress", value = "采购地", required = true, dataType = "java.lang.String", example = "中国福建省福州市")
    private String poAddress;

    // 来源 1-内地 2-跨境商品
    @NotNull(message = "来源不能为空")
    @ApiModelProperty(name = "source", value = "来源", required = true, dataType = "java.lang.Integer", example = "1")
    private Integer source;

    // 属性
    @NotNull(message = "属性不能为空")
    @ApiModelProperty(name = "extendProperty", value = "属性", required = true, dataType = "java.lang.String", example = "{}")
    private String extendProperty;

    // 规格
    @NotNull(message = "规格不能为空")
    @ApiModelProperty(name = "extendSpec", value = "规格", required = true, dataType = "java.lang.String", example = "{}")
    private String extendSpec;

    // 状态  0-档案 1-已审批 2-下架
    @NotNull(message = "状态不能为空")
    @ApiModelProperty(name = "status", value = "状态", required = true, dataType = "java.lang.Integer", example = "0")
    private Integer status;

    // 公私有 1-公有 2-私有
    @NotNull(message = "公私有不能为空")
    @ApiModelProperty(name = "published", value = "公私有", required = true, dataType = "java.lang.Integer", example = "1")
    private Integer published;
}  